home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / comms / other / dwarfx-tng / dwarfx / dwarfaway.amirx < prev    next >
Text File  |  1999-04-19  |  4KB  |  16 lines

  1. /* $VER: DWaRFAWaY.AmIRX v1.2
  2. \\
  3. // By David Newton & Leigh Brakes
  4. \\ with additions made by Gareth Murfin
  5. //
  6. \\ USAGE: /Rx DWaRFAWaY.amirx [AWAY REASON]
  7. //
  8. \\ If you don't give an AWAY REASON, then you will be set back.
  9. // If The first word of the reason is a single number, this will be used
  10. \\ to select what quote you would like but i'd advise not using a number
  11. // in order for a random red dwarf away quote to be picked.
  12. \\
  13. // Put this script in AmIRC:rexx/ and add it as an alias to AmIRC with the
  14. \\ command: "/alias DwAWAY = /rx DWaRFAWaY.AmIRX %p"
  15. */
  16. Options Results;Parse Arg quote' 'reason;'Channels';mychans=result;evnum=Substr(Address(),Pos('.',Address()));'GetAwayState';mystate=rc;Call Setclip('DFxTIME'evnum,Time());If DataType(quote)~="NUM" then;Do;reason=quote' 'reason;quote=0;End;If reason~="" Then;Do;If mystate=0 Then;Do;sentence="";Call GETAWAYQUOTE();If sentence="" Then Exit;page=GetClip('DFxAWAYPAGER'evnum);log=GetClip('DFxAWAYLOG'evnum);setup="[PAGE "d2c(2);Select;When page="Y" then setup=setup||"ON"d2c(2);When page="F" then setup=setup||"ON (FRIENDS ONLY)"d2c(2);Otherwise setup=setup||"OFF"d2c(2);End;setup=setup"] [LOG "d2c(2);If log="Y" then setup=setup||"ON"d2c(2)"]";Else setup=setup||"OFF"d2c(2)"]";If Words(mychans)>0 Then;Do;Do count=1 To Words(mychans);"Raw PRIVMSG "Word(mychans,count)" :"d2c(1)"ACTION "sentence" "d2c(2)"[AWAY] |DWaRFx-TNG|"d2c(2)" "setup" -"d2c(2)" "reason d2c(1);End;End;"Echo P="d2c(27)"x«DWaRFAWaY» You have been set AWAY using "d2c(2)"|DWaRFx-TNG|"d2c(2)" - "d2c(2)reason||d2c(2)" "setup;"Raw AWAY :"d2c(2)||reason||d2c(2)" - "setup" "d2c(2)"|DWaRFx-TNG|"d2c(2);End;Else;Do;'Echo P='d2c(27)'x«DWaRFAWaY» 'd2c(2)'ERROR:'d2c(2)' You are already set as being away smeg head!';End;End;Else;Do;If mystate=5 Then;Do;sentence="";Call GETBACKQUOTE;If sentence="" Then Exit;If Words(mychans)>0 Then;Do;Do count=1 To Words(mychans);"Raw PRIVMSG "Word(mychans,count)" :"d2c(1)"ACTION "sentence" "d2c(2)"[BACK] |DWaRFx-TNG| "d2c(1);End;End;"Echo P="d2c(27)"x«DWaRFAWaY» You have been set BACK using "d2c(2)"|DWaRFx-TNG|"d2c(2);"Raw AWAY :";End;Else;Do;'Echo P='d2c(27)'x«DWaRFAWaY» 'd2c(2)'ERROR:'d2c(2)' You have not given a reason you gimp!';End;End;Exit;GETAWAYQUOTE:;awayquotes=5;If quote=0 Then quote=Random(1,awayquotes,Time(S));If quote>0"e<=awayquotes Then;Do;Select;When quote=1 Then sentence="has got onto his spacebike and bummed off down to the cargo bay for more lager.";When quote=2 Then sentence="has slipped on his VR helmet and gloves and disappeared into Better Than Life.";When quote=3 Then sentence="has had £50 stuffed into his wallet is hiding under the table trying to avoid a bar-room tidy";When quote=4 Then sentence="has gone to revise for the chefs exam so Rimmer will have to salute him.";When quote=5 Then sentence="has gone to surgery for a limb to be hacked off after getting infected by Mr Epideme!";End;Call SetClip('DFxAWAYNUM'evnum,quote);End;Else;Do;'Echo P='d2c(27)'x«DWaRFAWaY» 'd2c(2)'ERROR:'d2c(2)' No [AWAY] quote with the number 'd2c(2)'quote'd2c(2)'!';End;Return;GETBACKQUOTE:;backquotes=5;newquote=GetClip('DFxAWAYNUM'evnum);Call SetClip('DFxAWAYNUM'evnum);If quote=0&newquote~="" Then quote=newquote;If quote=0 Then quote=Random(1,backquotes,Time(S));If quote>0"e<=backquotes Then;Do;Select;When quote=1 Then sentence="has stumbled back to the AR unit carrying a beer milkshake and a vindaloo.";When quote=2 Then sentence="has had his face smeared with jam so he has decide to return Back To Reality.";When quote=3 Then sentence="has had his shoulder re-located and his cracked rib & bruise sucked from his body.";When quote=4 Then sentence="has failed the chefs exam but pretended to Rimmer he's passed.";When quote=5 Then sentence="has returned with no arm! Luckily Kryten is on 24 hour wipe alert.";End;End;Else;Do;'Echo P='d2c(27)'x«DWaRFAWaY» 'd2c(2)'ERROR:'d2c(2)' No [BACK] quote with the number 'd2c(2)'quote'd2c(2)'!';End;Return